/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vmcs.controller.statePattern;

/**
 *
 * @author Eileen
 */
class DispenseDrinkState extends VmcsState {

    DispenseDrinkState(TransactionController fsm) {
        this.m_fsm = fsm;
    }

    @Override
    public void OnSelectDrink() {
        System.out.println("DispenseDrinkState::On Select drink");
    }

    @Override
    public void OnTerminate() {
        System.out.println("DispenseDrinkState::On terminate");
    }

    @Override
    public void OnGiveChange() {
        System.out.println("DispenseDrinkState::On give change");
    }

    @Override
    public void OnDispenseDrink() {
        String drink = m_fsm.getDrinkSelection();
        System.out.println("DispenseDrinkState::On dispense drink");
        m_fsm.getState(TransactionController.CHANGE_GIVE).OnGiveChange();
        m_fsm.setActivateCoinPanel(false);
        m_fsm.changeState(TransactionController.DRINK_SEL);
        m_fsm.setDrinkDispense(drink);
        m_fsm.setDrinkSelection(null);
    }

    @Override
    public void OnMaintenance() {
        System.out.println("DispenseDrinkState::On Maintenance mode");
    }

    @Override
    public void OnReceiveCoin() {
        System.out.println("DispenseDrinkState::On Receive Coin");
    }

    @Override
    public void OnStoreCoin() {
        System.out.println("DispenseDrinkState::On Receive Coin");
    }
}
